package com.ahuan.domain;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

@Data
public class Product {

    @ExcelProperty(value = "序号", index = 0)
    private Long id = 1L;

    @ExcelProperty(value = "名称", index = 5)
    private String name;

    @ExcelProperty(value = "入库", index = 8)
    private Integer inventorySum;

    @ExcelProperty(value = "余量", index = 10)
    private Integer inventory;

    @ExcelProperty(value = "出库", index = 9)
    private Integer inventoryRemove;

    @ExcelProperty(value = "单位", index = 11)
    private String unit;

    @ExcelProperty(value = "入库用途", index = 7)
    private  String inventoryUse = "YYYYYY";

    @ExcelIgnore
    @JsonIgnore
    private String location;

    @ExcelProperty(value = "库房", index = 2)
    private String storehouse;//库房

    @ExcelProperty(value = "位置", index = 3)
    private String shelf; //货架

    @ExcelProperty(value = "编号", index = 4)
    private String number;//货架编号

    @ExcelIgnore
    private Boolean alarm = false;//默认不预警

    @ExcelIgnore
    private String code;//物件编号

    @ExcelIgnore
    private Integer alarmValue = 0;//默认值

    @ExcelProperty(value = "型号", index = 6)
    private String type;

    @ExcelIgnore
    private String img;

    @ExcelIgnore
    private Boolean statusCode;

    @ExcelProperty(value = "经办人", index =12)
    private Long createUser = 1L;

    @ExcelProperty(value = "日期", index = 1)
    private String createTime;

    @ExcelIgnore
    private Long updateUser;

    @ExcelIgnore
    private String updateTime;

    @ExcelProperty(value = "备注", index = 13)
    private String remark = "XXXX备注";

    @ExcelIgnore
    private String stockCheck = "正常";

    public boolean isEmpty() {
        return name == null || name.isEmpty();
    }
}
